<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../libs/vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- 
            表单修饰符
                trim: 去掉两端空格
                number: 转换为数值类型
                lazy: 当失去焦点时绑定数据
         -->
        <input type="text" v-model.lazy="msg">
        <hr>
        <h3>=={{msg}}==</h3>
        <button @click="handle">点击</button>
    </div>
    <script>
        let vm = new Vue({
            el:'#app',
            data:{
                msg:''
            },
            methods: {
                handle(){
                    console.log(this.msg)
                }
            },
        })
    </script>
</body>
</html>